﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Edge.Repository.Base
{

    public static class EdgeId {

        public static long GetLongKeyId() {
            System.DateTime time = DateTime.Now;
            System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1, 0, 0, 0, 0));
            long t = (time.Ticks - startTime.Ticks) / 10000;  //除10000调整为13位   
            return t;

        }

    }


    public class EdgeBaseLongModel
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [SqlSugar.SugarColumn(IsPrimaryKey = true )]
        public long KeyId { get; set; }


        /// <summary>
        /// 平台ID 
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public long Id { get; set; }

    }

    public class EdgeBaseModel
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int  Id { get; set; }

         

    }

    public class BaseModel
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }


    }


}
